package ar.com.agea.util

class StringUtils {

	/**
	 * 
	 * @param String
	 * @param replacementMap with Regex String
	 * @return string replaced
	 */
	def static multipleReplaceAll(String s, Map<String, String> replacementMap) {
		replacementMap.each { k, v ->
			s = s.replaceAll(k, v)
		}
		return s
	}

	/**
	 * 
	 * @param String
	 * @param replacementMap with chars sequence
	 * @returns string replaced
	 */
	def static multipleReplace(String s, Map<String, String> replacementMap) {
		replacementMap.each { k, v ->
			s = s.replace(k, v)
		}
		return s
	}
	
}
